<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>购物车 - 钓鱼小程序</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        /* 移动端滚动条优化 - 隐藏滚动条 */
        ::-webkit-scrollbar {
            display: none;
        }
        
        * {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f5f7fa;
            padding-bottom: 80px;
            padding-top: 50px;
            color: #333;
            line-height: 1.6;
            max-width: 375px;
            margin: 0 auto;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: #ffffff;
            padding: 10px 15px;
            border-bottom: 1px solid #e8e8e8;
            display: flex;
            align-items: center;
            gap: 15px;
            z-index: 100;
        }
        
        .back-btn {
            font-size: 18px;
            color: #3498DB;
        }
        
        .header-title {
            font-size: 18px;
            font-weight: 600;
            color: #2c3e50;
            flex: 1;
        }
        
        .edit-btn {
            font-size: 14px;
            color: #3498DB;
        }
        
        /* 小程序胶囊按钮 */
        .capsule-btn {
            background: rgba(0,0,0,0.1);
            border-radius: 16px;
            padding: 6px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: 8px;
        }
        
        .capsule-btn .dot {
            width: 4px;
            height: 4px;
            background: #666;
            border-radius: 50%;
        }

        .main-content {
            flex: 1;
            padding-bottom: 80px;
        }

        .cart-header {
            background: white;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            border-bottom: 1px solid #eee;
        }

        .select-all {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .checkbox {
            width: 18px;
            height: 18px;
            border: 2px solid #ddd;
            border-radius: 3px;
            position: relative;
            cursor: pointer;
        }

        .checkbox.checked {
            background: #3498DB;
            border-color: #3498DB;
        }

        .checkbox.checked::after {
            content: '✓';
            position: absolute;
            top: -2px;
            left: 2px;
            color: white;
            font-size: 12px;
            font-weight: bold;
        }

        .cart-items {
            background: white;
            margin-top: 8px;
        }

        .cart-item {
            padding: 16px;
            border-bottom: 1px solid #f0f0f0;
            display: flex;
            gap: 12px;
        }

        .cart-item:last-child {
            border-bottom: none;
        }

        .item-checkbox {
            margin-top: 8px;
        }

        .item-image {
            width: 80px;
            height: 80px;
            border-radius: 8px;
            background: #f0f0f0;
            object-fit: cover;
        }

        .item-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .item-title {
            font-size: 14px;
            font-weight: 500;
            line-height: 1.4;
            color: #333;
        }

        .item-specs {
            font-size: 12px;
            color: #666;
        }

        .item-price {
            font-size: 16px;
            font-weight: 600;
            color: #e74c3c;
        }

        .item-original-price {
            font-size: 12px;
            color: #999;
            text-decoration: line-through;
            margin-left: 8px;
        }

        .quantity-control {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 8px;
        }

        .quantity-btn {
            width: 28px;
            height: 28px;
            border: 1px solid #ddd;
            background: white;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 16px;
            color: #666;
        }

        .quantity-btn:hover {
            background: #f8f8f8;
        }

        .quantity-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .quantity-input {
            width: 40px;
            height: 28px;
            border: 1px solid #ddd;
            border-radius: 4px;
            text-align: center;
            font-size: 14px;
        }

        .delete-btn {
            color: #999;
            font-size: 12px;
            background: none;
            border: none;
            cursor: pointer;
            margin-top: 4px;
        }

        .coupon-section {
            background: white;
            margin-top: 8px;
            padding: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .coupon-info {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .coupon-icon {
            width: 20px;
            height: 20px;
            background: #ff6b6b;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 12px;
        }

        .coupon-text {
            font-size: 14px;
            color: #333;
        }

        .coupon-arrow {
            color: #999;
            font-size: 12px;
        }

        .recommend-section {
            background: white;
            margin-top: 8px;
            padding: 16px;
        }

        .recommend-title {
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 12px;
            color: #333;
        }

        .recommend-items {
            display: flex;
            gap: 12px;
            overflow-x: auto;
            padding-bottom: 4px;
        }

        .recommend-item {
            min-width: 100px;
            text-align: center;
        }

        .recommend-image {
            width: 80px;
            height: 80px;
            border-radius: 8px;
            background: #f0f0f0;
            margin-bottom: 4px;
        }

        .recommend-name {
            font-size: 12px;
            color: #333;
            margin-bottom: 2px;
        }

        .recommend-price {
            font-size: 12px;
            color: #e74c3c;
            font-weight: 500;
        }

        .bottom-bar {
            position: fixed;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 375px;
            background: white;
            border-top: 1px solid #eee;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .total-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .total-price {
            font-size: 16px;
            font-weight: 600;
            color: #e74c3c;
        }

        .total-discount {
            font-size: 12px;
            color: #27ae60;
        }

        .checkout-btn {
            background: #3498DB;
            color: white;
            border: none;
            border-radius: 20px;
            padding: 10px 24px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
        }

        .checkout-btn:disabled {
            background: #bdc3c7;
            cursor: not-allowed;
        }

        .empty-cart {
            text-align: center;
            padding: 60px 20px;
            color: #999;
        }

        .empty-icon {
            width: 80px;
            height: 80px;
            background: #f0f0f0;
            border-radius: 50%;
            margin: 0 auto 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
        }

        .empty-text {
            font-size: 14px;
            margin-bottom: 20px;
        }

        .go-shopping-btn {
            background: #3498DB;
            color: white;
            border: none;
            border-radius: 20px;
            padding: 10px 24px;
            font-size: 14px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div class="header">
        <button class="back-btn">←</button>
        <h1 class="header-title">购物车</h1>
        <button class="edit-btn">编辑</button>
        <div class="capsule-btn">
            <div class="dot"></div>
            <div class="dot"></div>
            <div class="dot"></div>
        </div>
    </div>

    <div class="main-content">
        <div class="cart-header">
            <div class="select-all">
                <div class="checkbox checked"></div>
                <span>全选</span>
            </div>
        </div>

        <div class="cart-items">
            <div class="cart-item">
                <div class="checkbox checked item-checkbox"></div>
                <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Crect width='80' height='80' fill='%23f0f0f0'/%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dy='0.3em' font-family='Arial' font-size='12' fill='%23999'%3E鱼竿%3C/text%3E%3C/svg%3E" alt="碳素鱼竿" class="item-image">
                <div class="item-info">
                    <div class="item-title">碳素超轻鱼竿 3.6米台钓竿</div>
                    <div class="item-specs">长度: 3.6米 | 调性: 28调</div>
                    <div>
                        <span class="item-price">¥168.00</span>
                        <span class="item-original-price">¥268.00</span>
                    </div>
                    <div class="quantity-control">
                        <button class="quantity-btn">-</button>
                        <input type="number" value="1" class="quantity-input" readonly>
                        <button class="quantity-btn">+</button>
                        <button class="delete-btn">删除</button>
                    </div>
                </div>
            </div>

            <div class="cart-item">
                <div class="checkbox checked item-checkbox"></div>
                <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Crect width='80' height='80' fill='%23f0f0f0'/%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dy='0.3em' font-family='Arial' font-size='12' fill='%23999'%3E鱼线%3C/text%3E%3C/svg%3E" alt="尼龙鱼线" class="item-image">
                <div class="item-info">
                    <div class="item-title">进口尼龙鱼线 100米装</div>
                    <div class="item-specs">线号: 2.0号 | 拉力: 8.5kg</div>
                    <div>
                        <span class="item-price">¥35.00</span>
                    </div>
                    <div class="quantity-control">
                        <button class="quantity-btn">-</button>
                        <input type="number" value="2" class="quantity-input" readonly>
                        <button class="quantity-btn">+</button>
                        <button class="delete-btn">删除</button>
                    </div>
                </div>
            </div>

            <div class="cart-item">
                <div class="checkbox item-checkbox"></div>
                <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Crect width='80' height='80' fill='%23f0f0f0'/%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dy='0.3em' font-family='Arial' font-size='12' fill='%23999'%3E鱼钩%3C/text%3E%3C/svg%3E" alt="鱼钩套装" class="item-image">
                <div class="item-info">
                    <div class="item-title">精品鱼钩套装 50枚装</div>
                    <div class="item-specs">型号: 伊势尼 | 规格: 3-7号混装</div>
                    <div>
                        <span class="item-price">¥28.00</span>
                        <span class="item-original-price">¥45.00</span>
                    </div>
                    <div class="quantity-control">
                        <button class="quantity-btn">-</button>
                        <input type="number" value="1" class="quantity-input" readonly>
                        <button class="quantity-btn">+</button>
                        <button class="delete-btn">删除</button>
                    </div>
                </div>
            </div>
        </div>

        <div class="coupon-section">
            <div class="coupon-info">
                <div class="coupon-icon">券</div>
                <span class="coupon-text">优惠券 (可用2张)</span>
            </div>
            <span class="coupon-arrow">></span>
        </div>

        <div class="recommend-section">
            <div class="recommend-title">为你推荐</div>
            <div class="recommend-items">
                <div class="recommend-item">
                    <div class="recommend-image"></div>
                    <div class="recommend-name">浮漂套装</div>
                    <div class="recommend-price">¥45</div>
                </div>
                <div class="recommend-item">
                    <div class="recommend-image"></div>
                    <div class="recommend-name">钓鱼椅</div>
                    <div class="recommend-price">¥128</div>
                </div>
                <div class="recommend-item">
                    <div class="recommend-image"></div>
                    <div class="recommend-name">鱼饵盒</div>
                    <div class="recommend-price">¥25</div>
                </div>
            </div>
        </div>
    </div>

    <div class="bottom-bar">
        <div class="total-info">
            <div class="total-price">合计: ¥238.00</div>
            <div class="total-discount">已优惠 ¥105.00</div>
        </div>
        <button class="checkout-btn">结算(2)</button>
    </div>

    <script>
        // 简单的交互逻辑
        document.querySelectorAll('.checkbox').forEach(checkbox => {
            checkbox.addEventListener('click', function() {
                this.classList.toggle('checked');
            });
        });

        document.querySelectorAll('.quantity-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                const input = this.parentNode.querySelector('.quantity-input');
                const isIncrease = this.textContent === '+';
                let value = parseInt(input.value);
                
                if (isIncrease) {
                    value++;
                } else if (value > 1) {
                    value--;
                }
                
                input.value = value;
            });
        });
    </script>
</body>
</html> 